package server.domain;
/**
 * 异步请求的通用响应
 * 
 *
 */
public class AjaxResult {
	private Integer code;
	private String message;
	
	/**
	 * 返回一个成功的响应
	 * @return
	 */
	public static AjaxResult success() {
		AjaxResult result = new AjaxResult();
		result.setCode(200);
		result.setMessage("响应成功！");
		return result;
	}
	public static AjaxResult faile() {
		AjaxResult result = new AjaxResult();
		result.setCode(400);
		result.setMessage("响应失败！");
		return result;
	}
	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
}